3.375 \(\int (d+e x^r) (a+b \log (c x^n)) \, dx\)

Optimal. Leaf size=57 \[ d x \left (a+b \log \left (c x^n\right )\right )+\frac{e x^{r+1} \left (a+b \log \left (c x^n\right )\right )}{r+1}-b d n x-\frac{b e n x^{r+1}}{(r+1)^2} \]

[Out]

-(b*d*n*x) - (b*e*n*x^(1 + r))/(1 + r)^2 + d*x*(a + b*Log[c*x^n]) + (e*x^(1 + r)*(a + b*Log[c*x^n]))/(1 + r)

________________________________________________________________________________________

Rubi [A]  time = 0.0339829, antiderivative size = 49, normalized size of antiderivative = 0.86, number of steps used = 3, number of rules used = 2, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {2313, 12} \[ \left (d x+\frac{e x^{r+1}}{r+1}\right ) \left (a+b \log \left (c x^n\right )\right )-b d n x-\frac{b e n x^{r+1}}{(r+1)^2} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x^r)*(a + b*Log[c*x^n]),x]

[Out]

-(b*d*n*x) - (b*e*n*x^(1 + r))/(1 + r)^2 + (d*x + (e*x^(1 + r))/(1 + r))*(a + b*Log[c*x^n])

Rule 2313

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = IntHide[(d +
 e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]] /; FreeQ[{a,
b, c, d, e, n, r}, x] && IGtQ[q, 0]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rubi steps

\begin{align*} \int \left (d+e x^r\right ) \left (a+b \log \left (c x^n\right )\right ) \, dx &=\left (d x+\frac{e x^{1+r}}{1+r}\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \frac{d+d r+e x^r}{1+r} \, dx\\ &=\left (d x+\frac{e x^{1+r}}{1+r}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{(b n) \int \left (d+d r+e x^r\right ) \, dx}{1+r}\\ &=-b d n x-\frac{b e n x^{1+r}}{(1+r)^2}+\left (d x+\frac{e x^{1+r}}{1+r}\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end{align*}

Mathematica [A]  time = 0.121995, size = 53, normalized size = 0.93 \[ x \left (\frac{e x^r \left (a+b \log \left (c x^n\right )\right )}{r+1}+a d+b d \log \left (c x^n\right )-b d n-\frac{b e n x^r}{(r+1)^2}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x^r)*(a + b*Log[c*x^n]),x]

[Out]

x*(a*d - b*d*n - (b*e*n*x^r)/(1 + r)^2 + b*d*Log[c*x^n] + (e*x^r*(a + b*Log[c*x^n]))/(1 + r))

________________________________________________________________________________________

Maple [C]  time = 0.236, size = 606, normalized size = 10.6 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e*x^r)*(a+b*ln(c*x^n)),x)

[Out]

b*x*(d*r+e*x^r+d)/(1+r)*ln(x^n)-1/2*x*(-2*a*d-2*x^r*a*e*r+2*x^r*b*e*n+4*b*d*n*r+I*Pi*b*e*csgn(I*x^n)*csgn(I*c*
x^n)*csgn(I*c)*x^r*r+2*b*d*n-2*x^r*a*e-4*ln(c)*b*d*r-2*ln(c)*b*d*r^2-2*ln(c)*b*e*x^r*r+I*Pi*b*e*csgn(I*c*x^n)^
3*x^r+2*I*Pi*b*d*csgn(I*c*x^n)^3*r-I*Pi*b*d*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*d*csgn(I*c*x^n)^2*csgn(I*c)+I*P
i*b*d*csgn(I*c*x^n)^3+I*Pi*b*e*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*x^r-I*Pi*b*e*csgn(I*x^n)*csgn(I*c*x^n)^2*x^
r*r+I*Pi*b*d*r^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-2*ln(c)*b*e*x^r-2*a*d*r^2-2*ln(c)*b*d-4*a*d*r+2*b*d*n*r^2
+2*I*Pi*b*d*r*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-I*Pi*b*e*csgn(I*c*x^n)^2*csgn(I*c)*x^r*r+I*Pi*b*d*r^2*csgn(I
*c*x^n)^3-I*Pi*b*d*r^2*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*d*r^2*csgn(I*c*x^n)^2*csgn(I*c)-2*I*Pi*b*d*r*csgn(I*
x^n)*csgn(I*c*x^n)^2-2*I*Pi*b*d*r*csgn(I*c*x^n)^2*csgn(I*c)+I*Pi*b*d*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-I*Pi*
b*e*csgn(I*x^n)*csgn(I*c*x^n)^2*x^r+I*Pi*b*e*csgn(I*c*x^n)^3*x^r*r-I*Pi*b*e*csgn(I*c*x^n)^2*csgn(I*c)*x^r)/(1+
r)^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)*(a+b*log(c*x^n)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.37304, size = 325, normalized size = 5.7 \begin{align*} \frac{{\left (b d r^{2} + 2 \, b d r + b d\right )} x \log \left (c\right ) +{\left (b d n r^{2} + 2 \, b d n r + b d n\right )} x \log \left (x\right ) -{\left (b d n +{\left (b d n - a d\right )} r^{2} - a d + 2 \,{\left (b d n - a d\right )} r\right )} x +{\left ({\left (b e r + b e\right )} x \log \left (c\right ) +{\left (b e n r + b e n\right )} x \log \left (x\right ) -{\left (b e n - a e r - a e\right )} x\right )} x^{r}}{r^{2} + 2 \, r + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)*(a+b*log(c*x^n)),x, algorithm="fricas")

[Out]

((b*d*r^2 + 2*b*d*r + b*d)*x*log(c) + (b*d*n*r^2 + 2*b*d*n*r + b*d*n)*x*log(x) - (b*d*n + (b*d*n - a*d)*r^2 -
a*d + 2*(b*d*n - a*d)*r)*x + ((b*e*r + b*e)*x*log(c) + (b*e*n*r + b*e*n)*x*log(x) - (b*e*n - a*e*r - a*e)*x)*x
^r)/(r^2 + 2*r + 1)

________________________________________________________________________________________

Sympy [A]  time = 2.8793, size = 423, normalized size = 7.42 \begin{align*} \begin{cases} \frac{a d r^{2} x}{r^{2} + 2 r + 1} + \frac{2 a d r x}{r^{2} + 2 r + 1} + \frac{a d x}{r^{2} + 2 r + 1} + \frac{a e r x x^{r}}{r^{2} + 2 r + 1} + \frac{a e x x^{r}}{r^{2} + 2 r + 1} + \frac{b d n r^{2} x \log{\left (x \right )}}{r^{2} + 2 r + 1} - \frac{b d n r^{2} x}{r^{2} + 2 r + 1} + \frac{2 b d n r x \log{\left (x \right )}}{r^{2} + 2 r + 1} - \frac{2 b d n r x}{r^{2} + 2 r + 1} + \frac{b d n x \log{\left (x \right )}}{r^{2} + 2 r + 1} - \frac{b d n x}{r^{2} + 2 r + 1} + \frac{b d r^{2} x \log{\left (c \right )}}{r^{2} + 2 r + 1} + \frac{2 b d r x \log{\left (c \right )}}{r^{2} + 2 r + 1} + \frac{b d x \log{\left (c \right )}}{r^{2} + 2 r + 1} + \frac{b e n r x x^{r} \log{\left (x \right )}}{r^{2} + 2 r + 1} + \frac{b e n x x^{r} \log{\left (x \right )}}{r^{2} + 2 r + 1} - \frac{b e n x x^{r}}{r^{2} + 2 r + 1} + \frac{b e r x x^{r} \log{\left (c \right )}}{r^{2} + 2 r + 1} + \frac{b e x x^{r} \log{\left (c \right )}}{r^{2} + 2 r + 1} & \text{for}\: r \neq -1 \\a d x + a e \log{\left (x \right )} + b d n x \log{\left (x \right )} - b d n x + b d x \log{\left (c \right )} + \frac{b e n \log{\left (x \right )}^{2}}{2} + b e \log{\left (c \right )} \log{\left (x \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x**r)*(a+b*ln(c*x**n)),x)

[Out]

Piecewise((a*d*r**2*x/(r**2 + 2*r + 1) + 2*a*d*r*x/(r**2 + 2*r + 1) + a*d*x/(r**2 + 2*r + 1) + a*e*r*x*x**r/(r
**2 + 2*r + 1) + a*e*x*x**r/(r**2 + 2*r + 1) + b*d*n*r**2*x*log(x)/(r**2 + 2*r + 1) - b*d*n*r**2*x/(r**2 + 2*r
 + 1) + 2*b*d*n*r*x*log(x)/(r**2 + 2*r + 1) - 2*b*d*n*r*x/(r**2 + 2*r + 1) + b*d*n*x*log(x)/(r**2 + 2*r + 1) -
 b*d*n*x/(r**2 + 2*r + 1) + b*d*r**2*x*log(c)/(r**2 + 2*r + 1) + 2*b*d*r*x*log(c)/(r**2 + 2*r + 1) + b*d*x*log
(c)/(r**2 + 2*r + 1) + b*e*n*r*x*x**r*log(x)/(r**2 + 2*r + 1) + b*e*n*x*x**r*log(x)/(r**2 + 2*r + 1) - b*e*n*x
*x**r/(r**2 + 2*r + 1) + b*e*r*x*x**r*log(c)/(r**2 + 2*r + 1) + b*e*x*x**r*log(c)/(r**2 + 2*r + 1), Ne(r, -1))
, (a*d*x + a*e*log(x) + b*d*n*x*log(x) - b*d*n*x + b*d*x*log(c) + b*e*n*log(x)**2/2 + b*e*log(c)*log(x), True)
)

________________________________________________________________________________________

Giac [B]  time = 1.3116, size = 155, normalized size = 2.72 \begin{align*} \frac{b n r x x^{r} e \log \left (x\right )}{r^{2} + 2 \, r + 1} + b d n x \log \left (x\right ) + \frac{b n x x^{r} e \log \left (x\right )}{r^{2} + 2 \, r + 1} - b d n x - \frac{b n x x^{r} e}{r^{2} + 2 \, r + 1} + b d x \log \left (c\right ) + \frac{b x x^{r} e \log \left (c\right )}{r + 1} + a d x + \frac{a x x^{r} e}{r + 1} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)*(a+b*log(c*x^n)),x, algorithm="giac")

[Out]

b*n*r*x*x^r*e*log(x)/(r^2 + 2*r + 1) + b*d*n*x*log(x) + b*n*x*x^r*e*log(x)/(r^2 + 2*r + 1) - b*d*n*x - b*n*x*x
^r*e/(r^2 + 2*r + 1) + b*d*x*log(c) + b*x*x^r*e*log(c)/(r + 1) + a*d*x + a*x*x^r*e/(r + 1)